package demo.hw;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 给定n个字符串，对n个字符串按照字典排序排列
 * 输入
 * 9
 * cap
 * to
 * card
 * two
 * too
 * up
 * boat
 * boot
 * 输出---
 * boat
 * boot
 * cap
 * card
 * cat
 * to
 * too
 * two
 * up
 *
 * @author taqo
 * @date 2021/5/25
 */
public class _字符串排序 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] arr = new String[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextLine();
        }
        Arrays.sort(arr);
        for (String s : arr) {
            System.out.println(s);
        }
    }
}
